Trash-Object
An object of class Trash-Object is the Trash for a specific Finder application. The Trash property of the Finder application is an object of this class.PROPERTIES
A trash-object has all the properties defined for object class Container on page 42: Completely Expanded, Container Window, Entire Contents, Expandable, Expanded, Previous List View, Selection, and View.Like any other container, a trash-object also has all the properties defined for object class object class Item on page 72: Bounds, Comment, Container, Content Space, Creation Date, Disk, Folder, Icon, ID, Information Window, Kind, Label Index, Modification Date, Name, Physical Size, Position, Selected, Size,
and Window.Unlike other containers, a trash-object also has these properties:
warn before emptying
- A Boolean value that indicates whether the Warn Before Emptying checkbox in the Trash's Information Window is selected (
true
) or not (false
).
Class: Boolean
Modifiable: YesELEMENT CLASSES
Objects of these classes can be identified at the top level of a trash-object by name or by number. Page numbers indicate the location of corresponding definitions in this chapter.
- Accessory Suitcase (page 27)
- Alias File (page 28)
- Application File (page 38)
- Container (page 42)
- Control Panel (page 51)
- Desk Accessory File (page 54)
- Document File (page 59)
- File (page 60)
- Folder (page 62)
- Font File (page 64)
- Font Suitcase (page 65)
- Item (page 72)
- Sharable Container (page 78)
- Sound File (page 86)
- Suitcase (page 88)
COMMANDS HANDLED
Count, Exists, Sort, UpdateDEFAULT VALUE CLASS RETURNED
Reference.EXAMPLE
To refer to a trash-object, you must use the Trash property of the desktop:
tell application "Finder" clean up trash end tellNote that it's not necessary to refer to thetrash of desktop
; the Finder interpretstrash
as the desktop's Trash property.